// pages/login/login_phone/login_phone.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    phoneNum:"",
    pwdNum:"",
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
  
  },
  // 手机号码失去焦点
  phoneBlur(e){
    let that = this;
    that.setData({
      phoneNum:e.detail.value
    })
  },
  //密码失去焦点
  pwdBlur(e){
    let that = this;
    that.setData({
      pwdNum:e.detail.value
    })
  },
  loginIn(){
    let that = this;
    if(that.data.phoneNum!=''&&that.data.pwdNum!=''){
      wx.switchTab({
        url: "/pages/index/index"
      });
    }else{
      wx.showToast({
        title: "发生错误",
        icon: 'none',
        duration: 1500,
        mask: false,
      });
    }
  }
  
})